<template>
  <div class="app">
    <h1>app组件</h1>
    <my_search></my_search>
    <my-about :about="name"></my-about>
    <span :class="[isItalic ? 'then': 'nothen']">你好啊</span>
    <div class="nothen">123</div>
    <button @click="tagger">切换</button>
  </div>
</template>

<script>
import Search from './components/search.vue'
export default {
  components: {
    'my_search': Search
  },
  data() {
    return {
      name: '老李',
      isItalic: true
    }
  },
  methods: {
    tagger() {
      this.isItalic = !this.isItalic
    }
  }
}
</script>
// 在gitee修改的代码
<style scoped>
  .then{
    font-style: italic;
  };
  .nothen {
    font-style: normal;
    font-size: 30px;
    color: red;
  }
</style>
